<?php
	if (isset($_GET["un"])){ 
		$username = $_GET["un"];
	}
	if (isset($_GET["last"])) $before = $_GET["last"];
	else $before = 0;
	if (file_exists('photo.php')) require_once 'photo.php';
	else if (file_exists('php/photo.php')) require_once 'php/photo.php';
	else require_once '../photo.php';
	
	$list = photo::getPhotoesAll($username);
	$nlist = mysql_num_rows($list);
	$count = 0;	$i = 0;
	if ($nlist!=0)	mysql_data_seek($list,$before);
	while (($row = mysql_fetch_array($list))&&$count<5){
		$count += 1;
		echo '<div class="thumbListPhoto" onclick="photoDetail(\'big\',\''.$row["USERNAME"].'\',\''.$row["IDFOTO"].'\')">';
		echo '<div class="thumbfloater">';
		echo '<img class="thumbnail" src="users/'.$row["USERNAME"].'/'.$row["FileFoto"].'" />';
		echo '</div></div>';
		if ($count % 5 == 0){echo '<div class="clearer"></div>';	}
	}
	if ($nlist <= $before+$count){
		echo '<input type="hidden" id="hbs" value="1"/>';
	}
?>
